---
title: Initialize the claim manager and data layer
summary: Provision the Oracle claim data portal used by all downstream claim business objects.
status: draft
owner: SAIF Documentation Generator
last_reviewed: 2026-08-21
library: SAIF.Application.Claim
reference_type: embedded
operation_id: OP-CLM-4
trigger: Invoked by the inherited AppManagerBase.Initialize() template method.
---

# Initialize the claim manager and data layer

This operation prepares the Oracle claim data portal that every subsequent claim data-access call in the manager's lifetime uses.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CLM-4 |
| **Trigger** | `OnInitialize()` then `OnCreateDataLayer()`, invoked by the inherited `AppManagerBase.Initialize()` template method |
| **Inputs** | none |
| **Outputs** | `IDataPortalInfo` handle registered under key `ClaimDPI` |
| **Primary components** | `ClaimAppManager.OnInitialize`, `ClaimAppManager.OnCreateDataLayer` |
| **Entry point** | `SAIF.Application.Claim/ClaimAppManager.vb` |

## Steps

1. `OnInitialize()` sets `DataLayer.DBUser = "CLM"` and seeds `Message = ClaimAppConstants.PLEASEENTERCLAIM` ([BR-CLM-013](../business-rules.md#br-clm-013-claim-database-user-pinned-to-clm)).
2. `OnCreateDataLayer()` calls `DataLayer.CreateOraclePortal(ClaimAppConstants.DPIClaimKey)` — creating the Oracle portal and registering the resulting `IDataPortalInfo` under key `ClaimDPI`.
   - Delegated logic: implemented in `ApplicationDataAccess.CreateOraclePortal` (`SAIF.Application`).
   > **Origin**: Oracle portal creation is implemented in `SAIF.Application` (`ApplicationDataAccess.CreateOraclePortal`) and executed on behalf of this operation.
3. On any exception, call `MarkContextNotSet()`, `MarkNoAccess()`, and rethrow as `ApplicationException("Unable to Establish Database Connection", ex)` ([BR-CLM-014](../business-rules.md#br-clm-014-connection-failure-surfaces-as-application-exception)).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Initialize]) --> SetUser[DataLayer.DBUser = CLM]
	SetUser --> SeedMsg["Seed Message: enter valid<br>claim number"]
	SeedMsg --> CreatePortal[CreateOraclePortal ClaimDPI]
	CreatePortal --> Result{Exception?}
	Result -->|No| Ready(["Portal ready under key<br>ClaimDPI"])
	Result -->|Yes| Fail["MarkContextNotSet,<br>MarkNoAccess"]
	Fail --> Rethrow([Throw ApplicationException])
```

## Failure and edge-case behavior

- No statements are executed during this operation; only the Oracle connection is opened.
- A connection failure leaves the manager in a no-access, no-context state and rethrows as `ApplicationException`.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Configuration](../configuration.md)

## Sources
- `SAIF.Application.Claim/ClaimAppManager.vb`
- `SAIF.Application.Claim/ClaimAppConstants.vb`
